/**
 * WTF Engine
 *
 * License... etc.
 **
 * GUI Menus
 **
 * Authors: Sean Micklethwaite
 **/

#ifndef __gui_menuH__
#define __gui_menuH__

#include "gui_layout.h"

namespace WtfGui {
	namespace Widgets {
		class Menu : public LayoutContainer {
			private:
				typedef std::vector<Widget::tRef>	tItemList;
				
				tItemList	mItems;
				unsigned	mY;
				
			public:
				Menu(const WtfEngine::String& sTitle)
				: LayoutContainer(LayoutContainer::tCreationOptions(), LayoutContainer::VERTICAL), mItems(), mY(0)
				{
					setPadding(IWidgetLayout::tPadding(iVector2D(10, 10), iVector2D(10, 10)));
				};
				
				virtual void AddChild(const AbstractWidget::tRef& rChild) {
					rChild->Resize(getInnerSize()[0], 30);
					LayoutContainer::AddChild(rChild);
				};
				
				bool OnKeyPress(int key, int flags);

				GC_AUTOSIZE(Menu);
		};
	};
};


#endif
